<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix='sec' uri='http://www.springframework.org/security/tags'%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<script type="text/javascript" src="scripts/boot.js"></script>
</head>
<body style="border: 0px; margin: 0px; padding: 0px;width: 100%;height: 100%">
	<div class="mini-toolbar" style="border-bottom:0;padding:0px;">
	    <table style="width:100%;">
	        <tr>
	            <td style="width:100%;">
	            	<sec:authorize url='/call_duplicate_sta_exports.do'>
		            <a class="mini-button" iconCls="icon-download" onclick="exportData()">导出全部</a>   
		            </sec:authorize>  
	            </td>
	            <td style="white-space:nowrap;">
	            	时间(开始时间)：<input id="leastCall" class="mini-datepicker" style="width:160px;" format="yyyy-MM-dd H:mm:ss" emptytext="请选择..." timeFormat="H:mm:ss" showTime="true" allowInput="false" />
	           		时间(截止时间)：<input id="firstCall" class="mini-datepicker" style="width:160px;" format="yyyy-MM-dd H:mm:ss" emptytext="请选择..." timeFormat="H:mm:ss" showTime="true" allowInput="false" />
	            </td>
				<td style="white-space:nowrap;"><a class="mini-button" iconCls="icon-search" onclick="search()">查询</a> </td>
	        </tr>
	    </table>           
	</div>
	<div class="mini-fit" >
	<div id="datagrid1" class="mini-datagrid " idField="id" pageSize="20" url="call_duplicate_statistics.do" style="width:100%;height:100%;">
		<div property="columns">
			<div type="indexcolumn"></div>
			<div field="outsideNum" width="25%" headerAlign="center" align="center">外线号码</div>
			<div field="callCount" width="25%" headerAlign="center" align="center">进线总数</div>
			<div field="repeatCallCount" width="25%" headerAlign="center" align="center">重复进线数</div>
			<div field="noRepeatCallCount" width="25%" headerAlign="center" align="center">不重复进线数</div>
		</div>
	</div>
	</div>
<script type="text/javascript">
mini.parse();
var grid = mini.get("datagrid1");
grid.load();

function search() {
	var leastCall = mini.get("leastCall").getFormValue();
	var firstCall = mini.get("firstCall").getFormValue();
    grid.load({leastCall:leastCall,firstCall:firstCall});
}

//导出全部
function exportData(){
	var leastCall = mini.get("leastCall").getFormValue();
	var firstCall = mini.get("firstCall").getFormValue();
	location.href="call_duplicate_sta_exports.do?leastCall="+leastCall+"&firstCall="+firstCall; 
}
</script>
</body>
</html>